import request from '@/utils/request'

// 查询听证申请审批表列表
export function listHearingRequest(query) {
  return request({
    url: '/ruoyi-system/hearingrequest/list',
    method: 'get',
    params: query,
  })
}

// 查询详细
export function getHearingRequest(id) {
  return request({
    url: '/ruoyi-system/hearingrequest/' + id,
    method: 'get',
  })
}

// 新增审批
export function addHearingRequest(data) {
  return request({
    url: '/ruoyi-system/hearingrequest',
    method: 'post',
    data: data,
  })
}

// 修改审批
export function updateHearingRequest(data) {
  return request({
    url: '/ruoyi-system/hearingrequest',
    method: 'put',
    data: data,
  })
}

// 删除审批
export function delHearingRequest(id) {
  return request({
    url: '/ruoyi-system/hearingrequest/' + id,
    method: 'delete',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/hearingrequest/caseList',
    method: 'get',
  })
}

export function getContent(id) {
  return request({
    url: '/ruoyi-system/hearingrequest/getContent?caseId=' + id,
    method: 'get',
  })
}

// 提交流程接口
export function submitHearingRequest(data) {
  return request({
    url: '/ruoyi-system/hearingrequest/submit',
    method: 'post',
    data,
  })
}

// 审核接口
export function reviewHearingRequest(data) {
  return request({
    url: '/ruoyi-system/hearingrequest/review',
    method: 'post',
    data,
  })
}

// 转办接口
export function transferHearingRequest(data) {
  return request({
    url: '/ruoyi-system/hearingrequest/transferTask',
    method: 'post',
    data,
  })
}
